Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coal and gas CC technologies #1200

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

yerbol-akhmetov
Copy link
Collaborator

@yerbol-akhmetov yerbol-akhmetov commented Nov 18, 2024

Changes proposed in this Pull Request

Good day. This PR aims to make coal and gas CC technologies available for selection in the config. Currently, it is a draft PR.
@davide-f, @danielelerede-oet, @GbotemiB

I am planning to add gas CC technologies and also test with costs.

Checklist

  • I consent to the release of this PR's code under the AGPLv3 license and non-code contributions under CC0-1.0 and CC-BY-4.0.
  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Changes in configuration options are added in all of config.default.yaml and config.tutorial.yaml.
  • Add a test config or line additions to test/ (note tests are changing the config.tutorial.yaml)
  • Changes in configuration options are also documented in doc/configtables/*.csv and line references are adjusted in doc/configuration.rst and doc/tutorial.rst.
  • A note for the release notes doc/release_notes.rst is amended in the format of previous release notes, including reference to the requested PR.

Copy link
Member

@ekatef ekatef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @yerbol-akhmetov, great work! 😄

Have added some comments which mainly relate to work with the configuration parameters. Could you please have a look? (sorry for jumping in, Davide has just notified that he is busy this week)

scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
@@ -358,6 +358,7 @@ costs:
year: 2030
version: v0.6.2
discountrate: [0.071] #, 0.086, 0.111]
scenario: "Moderate" # "Advanced", "Moderate", or "Conservative"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to add a comment on what exactly is meant by scenario here, as we have quite many of them in the config 😄 Probably, adjustment of the naming can help, as well: like tech_scenario or costs_scenario?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @ekatef. I will probably remove these changes. As it needs to be applied with @danielelerede-oet and @finozzifa PR on cost assumption integration. Being under costs section scenario is plan to mean cost scenario. But if it can lead to misunderstanding then I agree we can name it as cost_scenario.

@@ -508,6 +509,9 @@ sector:
network: false # ALWAYS FALSE for now (NOT USED)
network_data: GGIT # Global dataset -> 'GGIT' , European dataset -> 'IGGIELGN'
network_data_GGIT_status: ["Construction", "Operating", "Idle", "Shelved", "Mothballed", "Proposed"]
gas_NGCC: false # if true, Natural Gas 2-on-1 Combined Cycle (F-Frame) plant is added
CC: false # enable gas carbon capture technologies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My feeling is that it would be great to keep harmonise using upper and lowercase across the code: we have lower-cased cc for industry and co-generation here, while upper-case is used for steam methane reforming and thermal power plants in this PR. Can we align that somehow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, my thought was to change everywhere to uppercase CC. As it is strange that in SMR CC it is uppercase, while just cc is lowercase. I can make those changes within this PR if you agree.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree 🙂

Copy link
Collaborator Author

@yerbol-akhmetov yerbol-akhmetov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review, @ekatef. I will apply your suggestions into the code. However, this PR will still be draft as it will require new costs assumptions first being added to PyPSA/technology data and PyPSA-Earth.

@@ -358,6 +358,7 @@ costs:
year: 2030
version: v0.6.2
discountrate: [0.071] #, 0.086, 0.111]
scenario: "Moderate" # "Advanced", "Moderate", or "Conservative"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @ekatef. I will probably remove these changes. As it needs to be applied with @danielelerede-oet and @finozzifa PR on cost assumption integration. Being under costs section scenario is plan to mean cost scenario. But if it can lead to misunderstanding then I agree we can name it as cost_scenario.

@@ -508,6 +509,9 @@ sector:
network: false # ALWAYS FALSE for now (NOT USED)
network_data: GGIT # Global dataset -> 'GGIT' , European dataset -> 'IGGIELGN'
network_data_GGIT_status: ["Construction", "Operating", "Idle", "Shelved", "Mothballed", "Proposed"]
gas_NGCC: false # if true, Natural Gas 2-on-1 Combined Cycle (F-Frame) plant is added
CC: false # enable gas carbon capture technologies
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, my thought was to change everywhere to uppercase CC. As it is strange that in SMR CC it is uppercase, while just cc is lowercase. I can make those changes within this PR if you agree.

scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Show resolved Hide resolved
@ekatef
Copy link
Member

ekatef commented Dec 9, 2024

Thanks for the review, @ekatef. I will apply your suggestions into the code. However, this PR will still be draft as it will require new costs assumptions first being added to PyPSA/technology data and PyPSA-Earth.

Thanks for going trough the comments @yerbol-akhmetov. I just remembered that we have promised a preliminary review. So, I have tried to provide some initial feedback, though I absolutely agree that the final design depends also on the particular implementation of the technologies parameters in the technologies database.

My general impression is that PR introduces very interesting features into the model. Great work, and looking forward to see it being completed.

@ekatef
Copy link
Member

ekatef commented Dec 10, 2024

Thanks for the review, @ekatef. I will apply your suggestions into the code. However, this PR will still be draft as it will require new costs assumptions first being added to PyPSA/technology data and PyPSA-Earth.

Thanks for the revisions @yerbol-akhmetov. I recognise that the PR is still work in progress, but I think it's on a good track.

Have lifted changes requested status to prevent blocking the merge of this PR, but it has been interpreted by GitHub as approval (which is a funny status for a draft). Obviously, no pressure to complete the PR immediately, and feel free to complete it as you feel best.

Copy link
Member

@davide-f davide-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm commenting here as I've been pinged; I've scanned the contribution and looks quite promising!
Do you envision updates?

As minor comments, I'd support Katia's comment to remove the line "scenario" in config.default.

Moreover, to test the functionality of the model, I'd advise to revise the file test/config.test1.yaml to enable the sector-coupled technologies you proposed to ensure they get tested in the CI

@yerbol-akhmetov
Copy link
Collaborator Author

I'm commenting here as I've been pinged; I've scanned the contribution and looks quite promising! Do you envision updates?

As minor comments, I'd support Katia's comment to remove the line "scenario" in config.default.

Moreover, to test the functionality of the model, I'd advise to revise the file test/config.test1.yaml to enable the sector-coupled technologies you proposed to ensure they get tested in the CI

Thanks for revising it, @davide-f. The only change that I would like to make is to make sure these technologies are added only is costs file contains information about these techs, and also provide log that tech is not in costs file is not present. This way we make sure the error will not occur and user will need to use proper costs. The costs PR is not yet in pypsa-earth though. Adding if condition can help to prevent errors. What do you think? In short, I mean adding if conditions:

    if options["coal"].get("CC", False):
        coal_CC_techs = options["coal"].get("coal_CC_techs", list())

        if cc_tech in costs.index:
            for cc_tech in coal_CC_techs:
                n.madd(
                    "Link",
                    spatial.nodes + " " + cc_tech,
                    bus0=spatial.coal.nodes,
                    bus1=spatial.nodes,
                    bus2="co2 atmosphere",
                    bus3=spatial.co2.nodes,
                    marginal_cost=costs.at[cc_tech, "efficiency"]
                    * costs.at[cc_tech, "VOM"],  # NB: VOM is per MWel
                    # NB: fixed cost is per MWel
                    capital_cost=costs.at[cc_tech, "efficiency"]
                    * costs.at[cc_tech, "fixed"],
                    p_nom_extendable=True,
                    carrier="coal",
                    efficiency=costs.at[cc_tech, "efficiency"],
                    efficiency2=costs.at["coal", "CO2 intensity"]
                    * (1 - costs.at[cc_tech, "capture_rate"]),
                    efficiency3=costs.at["coal", "CO2 intensity"]
                    * costs.at[cc_tech, "capture_rate"],
                    lifetime=costs.at[cc_tech, "lifetime"],
                )

@yerbol-akhmetov
Copy link
Collaborator Author

yerbol-akhmetov commented Dec 22, 2024

I'm commenting here as I've been pinged; I've scanned the contribution and looks quite promising! Do you envision updates?

As minor comments, I'd support Katia's comment to remove the line "scenario" in config.default.

Moreover, to test the functionality of the model, I'd advise to revise the file test/config.test1.yaml to enable the sector-coupled technologies you proposed to ensure they get tested in the CI

Thanks, @davide-f. Regarding inclusion to test CI, I will revise it to include added techs there. But it will require costs file by NREL ATB to fully test it. Otherwise if we implement if case as I have mentioned above, it will not build those techs as they will not be in regular PyPSA-Earth cost file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants